%% ****** Start of file apstemplate.tex ****** %
%%
%%
%%   This file is part of the APS files in the REVTeX 4 distribution.
%%   Version 4.1r of REVTeX, August 2010
%%
%%
%%   Copyright (c) 2001, 2009, 2010 The American Physical Society.
%%
%%   See the REVTeX 4 README file for restrictions and more information.
%%
%
% This is a template for producing manuscripts for use with REVTEX 4.0
% Copy this file to another name and then work on that file.
% That way, you always have this original template file to use.
%
% Group addresses by affiliation; use superscriptaddress for long
% author lists, or if there are many overlapping affiliations.
% For Phys. Rev. appearance, change preprint to twocolumn.
% Choose pra, prb, prc, prd, pre, prl, prstab, prstper, or rmp for journal
%  Add 'draft' option to mark overfull boxes with black boxes
%  Add 'showpacs' option to make PACS codes appear
%  Add 'showkeys' option to make keywords appear
\documentclass[aps,prl,preprint,groupedaddress,showkeys, nobibnotes]{revtex4-1}
%\documentclass[aps,prl,preprint,superscriptaddress]{revtex4-1}
%\documentclass[aps,prl,reprint,groupedaddress]{revtex4-1}
\usepackage{mathtools}
% You should use BibTeX and apsrev.bst for references
% Choosing a journal automatically selects the correct APS
% BibTeX style file (bst file), so only uncomment the line
% below if necessary.
\bibliographystyle{apsrev4-1}

\begin{document}

% Use the \preprint command to place your local institutional report
% number in the upper righthand corner of the title page in preprint mode.
% Multiple \preprint commands are allowed.
% Use the 'preprintnumbers' class option to override journal defaults
% to display numbers if necessary
%\preprint{}

%Title of paper
\title{Multi-Dimensional Parallel Genetic Algorithm using OpenMP}

% repeat the \author .. \affiliation  etc. as needed
% \email, \thanks, \homepage, \altaffiliation all apply to the current
% author. Explanatory text should go in the []'s, actual e-mail
% address or url should go in the {}'s for \email and \homepage.
% Please use the appropriate macro foreach each type of information

% \affiliation command applies to all authors since the last
% \affiliation command. The \affiliation command should follow the
% other information
% \affiliation can be followed by \email, \homepage, \thanks as well.
\author{Zubia Shahid}
\email[]{zshahid@genmatixs.com}
\email[]{zshahid@us.edu}
\affiliation{University of Sciences, Philadelphia, PA}
\altaffiliation{genmatixs.com}

\author{Imran Khan}
\email[]{ikhan@genmatixs.com}
\email[]{ikhan@aer.com}
\affiliation{genmatixs.com}
\altaffiliation{Atmospheric and Environmental Research Inc}
%\homepage{genmatixs.com}
%\thanks{}
%\altaffiliation{}


%Collaboration name if desired (requires use of superscriptaddress
%option in \documentclass). \noaffiliation is required (may also be
%used with the \author command).
%\collaboration can be followed by \email, \homepage, \thanks as well.
%\collaboration{}
%\noaffiliation

\date{\today}

\begin{abstract}
We present a detailed description of a multi-dimensional genetic algorithm implemented in C++11 and the OpenMP library.  The use of the OpenMP library allows for the algorithm to be implemented using parallel processing and hence operate in an extremely efficient manner.  The algorithm also offers a considerable degree of flexibility in allowing the user to experiment with different cross-over operators.  Results are presented for several multi-dimensional functions and in comparison to more common genetic algorithms available. 
\end{abstract}

% insert suggested PACS numbers in braces on next line
\pacs{}
% insert suggested keywords - APS authors don't need to do this
\keywords{Genetic Algorithms, Parallel Algorithms, OpenMP}

%\maketitle must follow title, authors, abstract, \pacs, and \keywords
\maketitle

% body of paper here - Use proper section commands
% References should be done using the \cite, \ref, and \label commands
\section{\label{Intro}Introduction}
% Put \label in argument of \section for cross-referencing
%\section{\label{}}
Genetic algorithm(GA) is a type of search algorithm, which is designed to find the optimal solution of the given problem in complex search space.  It uses the principal of natural selection and evolution to produce several solutions of the problem.  Genetic Algorithm works by removing the weak solution from the search space.  It evaluates the fitness of the individual solution by calculating its fitness value depending upon the function provided by the user.  The individuals having higher fitness value are then selected, cross-bred and  mutated in order to give the best possible solution.  This cycle continues until the user gets the satisfied results.

Multi-dimensional parallel genetic algorithm with OpenMP has two distinguishing features which are as follows:
\begin{itemize}
  \item multi-dimensional genetic algorithm gives flexibility to the user to find solution of the function containing multiple dimensions.
  \item parallel genetic algorithm uses OpenMP which makes it more faster by reducing the time it takes to run.
\end{itemize}

In the past most of the genetic algorithm dealt with very restricted number of dimensions.  However, this genetic algorithm will be able to perform in multi-dimensional search space to give the best possible solution of complicated problems.  Additionally,the use of OpenMp instead of MPI(Message Passing Interface) has also proved to be a better option for parallel computing purpose.  It is considered easier to program and debug as compared to MPI.  OpenMP allows directives to be added incrementally, so the program can be parallelized one portion after another and thus no dramatic change to code is needed.  Whereas, more changes are required in converting from serial to parallel programming in MPI.  OpenMP is also considered best for loop parallelization, which has an extensive use in this genetic algorithm.




\subsection{}
\subsubsection{}

\section{Genetic Algorithm Components}
\subsection{Chromosome Builder}
The Chromosome Builder is responsible for creating a family of chromosomes from the domain space chosen by the user.  Each chromosome is represented as a dynamic array of \textit{boolean} values.  Although C++ provides a bitset data structure, as part of its Standard Template Library (STL), it does not have the flexibility of determining the length of a bitset at runtime.  Therefore, an array was chosen which could be dynamically altered (std::vector) to map to the user supplied domain space.  The length of the chromosome is bound by the domain space, for a given dimension of range [a:b] and a precision, P we have 

\begin{equation}
2^{N_{i}-1}<(b-a)\cdot10^{P}\leq2^{N_{i}}
\end{equation}

where $N_{i}$ is the apportioned length of the chromosome for a given dimension.  The total length of the chromosomes is then,

\begin{equation}
N_{length } = \sum\limits_{i=1}^{N_{dim}} N_{i}
\end{equation}

The OpenMP library allows for each dimension to be computed independently of the others, with a master thread combining all the lengths into a total length.  The total number of chromosomes can be set by the user with a default value of $75$, the initial values of each chromosome are randomly chosen.

\subsection{Roulette}
\subsection{Crossover}
\subsection{Mutate}

\section{Results}
\section{Conclusions}
\section{Further work}
% If in two-column mode, this environment will change to single-column
% format so that long equations can be displayed. Use
% sparingly.
%\begin{widetext}
% put long equation here
%\end{widetext}

% figures should be put into the text as floats.
% Use the graphics or graphicx packages (distributed with LaTeX2e)
% and the \includegraphics macro defined in those packages.
% See the LaTeX Graphics Companion by Michel Goosens, Sebastian Rahtz,
% and Frank Mittelbach for instance.
%
% Here is an example of the general form of a figure:
% Fill in the caption in the braces of the \caption{} command. Put the label
% that you will use with \ref{} command in the braces of the \label{} command.
% Use the figure* environment if the figure should span across the
% entire page. There is no need to do explicit centering.

% \begin{figure}
% \includegraphics{}%
% \caption{\label{}}
% \end{figure}

% Surround figure environment with turnpage environment for landscape
% figure
% \begin{turnpage}
% \begin{figure}
% \includegraphics{}%
% \caption{\label{}}
% \end{figure}
% \end{turnpage}

% tables should appear as floats within the text
%
% Here is an example of the general form of a table:
% Fill in the caption in the braces of the \caption{} command. Put the label
% that you will use with \ref{} command in the braces of the \label{} command.
% Insert the column specifiers (l, r, c, d, etc.) in the empty braces of the
% \begin{tabular}{} command.
% The ruledtabular enviroment adds doubled rules to table and sets a
% reasonable default table settings.
% Use the table* environment to get a full-width table in two-column
% Add \usepackage{longtable} and the longtable (or longtable*}
% environment for nicely formatted long tables. Or use the the [H]
% placement option to break a long table (with less control than 
% in longtable).
% \begin{table}%[H] add [H] placement to break table across pages
% \caption{\label{}}
% \begin{ruledtabular}
% \begin{tabular}{}
% Lines of table here ending with \\
% \end{tabular}
% \end{ruledtabular}
% \end{table}

% Surround table environment with turnpage environment for landscape
% table
% \begin{turnpage}
% \begin{table}
% \caption{\label{}}
% \begin{ruledtabular}
% \begin{tabular}{}
% \end{tabular}
% \end{ruledtabular}
% \end{table}
% \end{turnpage}

% Specify following sections are appendices. Use \appendix* if there
% only one appendix.
%\appendix
%\section{}

% If you have acknowledgments, this puts in the proper section head.
%\begin{acknowledgments}
% put your acknowledgments here.
%\end{acknowledgments}

% Create the reference section using BibTeX:
%\bibliography{basename of .bib file}
\bibliography{GAOpenMPNotes.bib}
\end{document}
%
% ****** End of file apstemplate.tex ******

